package com.bustle.product.webservice;

import java.util.List;

import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.jws.WebParam;
import javax.jws.WebService;

import com.bustle.product.ProviderDtoManager;
import com.bustle.product.dto.provider.ProviderDto;

@WebService
public interface ProviderDtoWebService
{
  public List<ProviderDto> getListProvider();
  public ProviderDto getById(@WebParam(name = "idProvider") int idProvider);


  @Stateless
  @WebService(endpointInterface = "com.bustle.product.webservice.ProviderDtoWebService")
  public class DefaultProviderDtoWebService implements ProviderDtoWebService
  {

    @EJB
    protected ProviderDtoManager providerDtoManager;

    @Override
    public List<ProviderDto> getListProvider()
    {
      return providerDtoManager.getListProvider();
    }

    @Override
    public ProviderDto getById(int paramIdProvider)
    {
      return providerDtoManager.getById(paramIdProvider);
    }

  }


}
